﻿/*
 * Returns a new date at the specified year, month and day.
 */
create function [Date].[FromParts] ( @p_Year int, @p_Month int, @p_Day int )
returns date as
begin

  return DateAdd( Month, (( @p_Year - 1900 ) * 12 ) + @p_Month - 1, @p_Day - 1 );

end